<template>
  <div>
    <el-form ref="form" :model="position" >
      <el-form-item label="">
         <el-row>
          <el-col :span="24">
           设为背景： <el-switch v-model="position.backgound" >
        </el-switch>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4">width：</el-col>
          <el-col :span="8">
            <el-input
              type="text"
              size="mini"
              v-model="position.width"
              placeholder="width"
            ></el-input>
          </el-col>
          <el-col :span="4">height：</el-col>
          <el-col :span="8">
            <el-input
              type="text"
              size="mini"
              v-model="position.height"
              placeholder="height"
            ></el-input>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="4">left</el-col>
          <el-col :span="8">
            <el-input
              type="text"
              size="mini"
              v-model="position.left"
              placeholder="width"
            ></el-input>
          </el-col>
          <el-col :span="4">top</el-col>
          <el-col :span="8">
            <el-input
              type="text"
              size="mini"
              v-model="position.top"
              placeholder="height"
            ></el-input>
          </el-col>
        </el-row>
        <!-- <el-row>
          <el-col :span="4">right</el-col>
          <el-col :span="8">
            <el-input
              type="text"
              size="mini"
              v-model="position.right"
              placeholder="width"
            ></el-input>
          </el-col>
          <el-col :span="4">bottom</el-col>
          <el-col :span="8">
            <el-input
              type="text"
              size="mini"
              v-model="position.bottom"
              placeholder="height"
            ></el-input>
          </el-col>
        </el-row> -->
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  props: {
    position: {
      default: () => {
        return { width: 0, height: 0, top: 0, left: 0 };
      }
    }
  },
  data() {
    return {
      form: {
        width: 0,
        height: 0,
        top: 0,
        left: 0,
        right: 0,
        bottom: 0,
      }
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    }
  }
};
</script>
<style>
.el-form-item {
  margin: 0px !important;
}
</style>
